package com.loctek.importexport;

import android.support.multidex.MultiDexApplication;
import com.loctek.importexport.util.DebugFlag;

/**
 * Created by slf on 2018/1/8.
 */

public class CustomApplication extends MultiDexApplication {

    private final static String LOG_TAG = "CustomApplication";


    protected static CustomApplication instance;

    public static CustomApplication getInstance() {
        return instance;
    }

    public CustomApplication() {

    }


    @Override
    public void onCreate() {
        DebugFlag.logInfo(LOG_TAG, "onCreate");
        super.onCreate();
        instance = this;

    }


    private boolean activityVisible;


    /**
     * 是否处于唤醒状态
     *
     * @return
     */
    public boolean isActivityVisible() {
        return activityVisible;
    }


    /**
     * 应用唤醒
     */
    public void activityResumed() {
        DebugFlag.logInfo(LOG_TAG, "activityResumed");
        activityVisible = true;
    }

    /**
     * 应用休眠
     */
    public void activityPaused() {
        DebugFlag.logInfo(LOG_TAG, "activityPaused");
        activityVisible = false;

    }

}
